home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 February
/
EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso
/
progs
/
thor
/
buildlist.thor
< prev
next >
Wrap
Text File
|
1996-11-10
|
2KB
|
100 lines
/* BuildList.thor by Troels Walsted Hansen
** $VER: BuildList.thor v2.00 (01.11.94)
**
** An ARexx script that will make it easy to build a list
** of BBSs and conferences, for use with CrossPost.thor or
** MultiUpload.thor.
**
** New: This version is only for THOR v2.0 or higher.
*/
options results
/* needs THOR and bbsread.library functions */
p = ' ' || address() || ' ' || show('P',,)
thorport = pos(' THOR.',p)
if thorport > 0 then thorport = word(substr(p,thorport+1),1)
else
do
say 'No THOR port found!'
exit 10
end
if ~show('p', 'BBSREAD') then
do
address command
"run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
"WaitForPort BBSREAD"
end
/* main stuff */
address(thorport)
THORTOFRONT
REQUESTNOTIFY TEXT '"Create new list or modify old one?"' BT '"_New|_Old"'
if(result = 0) then
do
REQUESTFILE TITLE '"Select CrossPost/MultiUpload list file:"' ID '"THOR:Rexx/PostingLists"' FP
configfile = result
lastchar = right(configfile,1)
if(rc ~= 0 | lastchar = "/" | lastchar = ":" | configfile = "") then exit
if exists(configfile) then
do
REQUESTNOTIFY TEXT '"File already exists. Append or overwrite?"' BT '"_Append|_Overwrite|_Cancel"'
if(result = 0) then exit
if(result = 1) then call open(cf, configfile, A)
if(result = 2) then call open(cf, configfile, W)
end
else call open(cf, configfile, W)
end
else
do
REQUESTSTRING TITLE '"Enter name and full path of list:"' BT '"_Ok|_Cancel"' ID '"THOR:Rexx/PostingLists/"' MAXCHARS 256
configfile = result
lastchar = right(configfile,1)
if(rc ~= 0 | lastchar = "/" | lastchar = ":" | configfile = "") then exit
else call open(cf, configfile, W)
end
address(bbsread)
GETBBSLIST stem BBSLIST
if(rc ~= 0) then
do
address(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
exit 5
end
address(thorport)
REQUESTLIST instem BBSLIST outstem USERBBSLIST title '"Select BBSs:"' DRAGSELECT MULTISELECT SIZEGADGET
if(rc ~= 0) then exit
do i=1 to USERBBSLIST.COUNT
address(bbsread)
GETCONFLIST '"'USERBBSLIST.i'"' CONFLIST
if(rc ~= 0) then
do
address(thorport)
REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
exit 5
end
address(thorport)
REQUESTLIST instem CONFLIST title '"Select conference at ' || USERBBSLIST.i || ':' || '"' SIZEGADGET
if(rc ~= 0) then confname = ""
else confname = result
call writeln(cf, "------------------")
call writeln(cf, "BBS: "USERBBSLIST.i)
call writeln(cf, "Conf: "confname)
end
call close(cf)
exit